package org.go.smart.light;

import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@SuppressWarnings("serial")
public class LightServlet extends HttpServlet{
	    
	    public void init(ServletConfig config) throws ServletException {
	    	super.init(config);
	    }

	    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	        doGet(request, response);
	    }

	    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	        response.setContentType("text/html");
	        ServletOutputStream out = response.getOutputStream();
	        out.println("<html>");
	        out.println("<h1>Welcome to the light section!</h1>");
	        out.println("<h1>!!! Under Construction !!!</h1>");
	        out.println("</html>");
	        out.flush();
	    }

}
